package com.hyt.it.ogt.ks.enums.log;

import lombok.Getter;

/**
 * @author wuyingge
 * @version 1.0.0
 * @ClassName CandidateWarnLogType.java
 * @Description 考生预警记录小类型
 * @createTime 2022年11月24日 18:21:00
 */
@Getter
public enum CandidateWarnLogType {

    OVER_SCREEN(201, "考生切屏"),
    VIDEO_MARK(202, "视频标记"),
    PC_MONITOR_INT(203, "主监控中断"),
    MOBILE_MONITOR_INT(204, "第二监控中断"),
    CANDIDATE_INT(205, "考生状态中断"),
    /**
     * （无人、多人、换人）
     */
    PHOTO_ALERT(206, "抓拍照片"),
    FACE_ERROR(207, "人脸核身失败"),
    PHOTO_ERROR(208, "照片比对失败"),
    LOGIN_SECOND_TIME(209, "二次及以上登录"),
    CHEAT_MARK(210, "违纪登记"),
    DEVICE_CHECK_FAIL(211, "设备检测失败"),
    SHARE_SCREEN(213, "分屏"),
    FLING_SCREEN(214, "投屏"),
    CUT_SCREEN(215, "截屏"),
    CALL_PHONE(216, "拨打电话"),
    SEND_MESSAGE(217, "收发短信");

    private Integer code;
    private String msg;

    CandidateWarnLogType(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getMsg(Integer code) {
        for (CandidateWarnLogType value : CandidateWarnLogType.values()) {
            if(value.getCode().equals(code)) {
                return value.getMsg();
            }
        }
        return null;
    }
}
